#include "Vec4.h"


SVec4::SVec4()
:X(0),Y(0),Z(0),W(0)
{
    
}

SVec4::SVec4(const SVec3& InXYZ,Float InW)
:X(InXYZ.X),Y(InXYZ.Y),Z(InXYZ.Z),W(InW)
{


}

SVec4::SVec4(Float InX,Float InY,Float InZ, Float InW)
:X(InX),Y(InY),Z(InZ),W(InW)
{

}

SVec4 SVec4::operator-() const
{
    return SVec4(-X,-Y,-Z,-W);
}

SVec4 SVec4::operator * (const Float& Other) const
{
    return SVec4(X*Other,Y*Other,Z*Other,W*Other);
}

SVec4& SVec4::operator *= (const Float& Other)
{
    X*=Other;
    Y*=Other;
    Z*=Other;
    W*=Other;

    return *this;
}

SVec4 SVec4::operator / (const Float& Other) const
{
    return SVec4(X/Other,Y/Other,Z/Other,W/Other); 
}

SVec4& SVec4::operator /= (const Float& Other)
{
    X/=Other;
    Y/=Other;
    Z/=Other;
    W/=Other;   
    
    return *this;
}

SVec4 SVec4::operator - (const SVec4& Other) const
{
	return SVec4(X - Other.X, Y - Other.Y, Z - Other.Z,W-Other.W);
}

SVec4& SVec4::operator -= (const SVec4& Other)
{
    X -= Other.X;
    Y -= Other.Y;
    Z -= Other.Z;
    W -= Other.W;

    return *this;
}

SVec4 SVec4::operator + (const SVec4& Other) const
{
	return SVec4(X + Other.X, Y + Other.Y, Z + Other.Z,W+Other.W);    
}

SVec4& SVec4::operator += (const SVec4& Other)
{
    X += Other.X;
    Y += Other.Y;
    Z += Other.Z;
    W += Other.W;

    return *this;
}

void SVec4::ToFloatArray(float OutArray[4]) const
{
    OutArray[0] = X;
    OutArray[1] = Y;
    OutArray[2] = Z;
    OutArray[3] = W;
}
